<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>赞助列表 | SocialSponsor</title>
    <!-- Bootstrap 5 CSS -->
    <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/css/bootstrap.min.css" rel="stylesheet">
    <!-- Font Awesome -->
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
    
    <style>
        :root {
            --primary: #3b82f6;
            --primary-light: #60a5fa;
            --primary-dark: #2563eb;
            --secondary: #64748b;
            --light: #f8fafc;
            --dark: #1e293b;
            --danger: #ef4444;
            --success: #10b981;
            --warning: #f59e0b;
            --border: #e2e8f0;
            --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
            --shadow-hover: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
            --radius: 8px;
            --transition: all 0.3s ease;
        }
        
        body {
            font-family: 'Inter', system-ui, sans-serif;
            background-color: #f1f5f9;
            color: var(--dark);
            line-height: 1.6;
        }
        
        .container {
            max-width: 1200px;
        }
        
        /* 导航栏 */
        .navbar {
            background-color: white;
            box-shadow: 0 2px 4px rgba(0,0,0,0.05);
            padding: 0.75rem 0;
            position: sticky;
            top: 0;
            z-index: 1030;
        }
        
        .logo {
            font-weight: 700;
            font-size: 1.5rem;
            color: var(--primary);
            text-decoration: none;
        }
        
        .nav-link {
            color: var(--secondary);
            margin-left: 1rem;
            transition: var(--transition);
        }
        
        .nav-link:hover, .nav-link.active {
            color: var(--primary);
        }
        
        /* 主内容区 */
        .main-content {
            padding: 2rem 0;
        }
        
        .section-header {
            margin-bottom: 2rem;
        }
        
        .section-title {
            font-size: 1.8rem;
            font-weight: 700;
            margin-bottom: 0.5rem;
        }
        
        .section-description {
            color: var(--secondary);
            max-width: 800px;
        }
        
        /* 筛选区域 */
        .filters-container {
            background-color: white;
            border-radius: var(--radius);
            box-shadow: var(--shadow);
            padding: 1.5rem;
            margin-bottom: 2rem;
        }
        
        .filter-section {
            margin-bottom: 1.5rem;
        }
        
        .filter-section:last-child {
            margin-bottom: 0;
        }
        
        .filter-title {
            font-weight: 600;
            margin-bottom: 0.75rem;
            color: var(--dark);
            display: flex;
            align-items: center;
            gap: 0.5rem;
        }
        
        .filter-title i {
            color: var(--primary);
        }
        
        .filter-options {
            display: flex;
            flex-wrap: wrap;
            gap: 0.75rem;
        }
        
        .filter-chip {
            background-color: var(--light);
            border: 1px solid var(--border);
            border-radius: 20px;
            padding: 0.35rem 1rem;
            font-size: 0.9rem;
            cursor: pointer;
            transition: var(--transition);
        }
        
        .filter-chip:hover {
            border-color: var(--primary);
            color: var(--primary);
        }
        
        .filter-chip.active {
            background-color: var(--primary);
            color: white;
            border-color: var(--primary);
        }
        
        .search-bar {
            position: relative;
            width: 100%;
        }
        
        .search-bar input {
            width: 100%;
            padding: 0.75rem 1rem 0.75rem 2.5rem;
            border: 1px solid var(--border);
            border-radius: var(--radius);
            font-size: 0.95rem;
            transition: var(--transition);
        }
        
        .search-bar input:focus {
            outline: none;
            border-color: var(--primary);
            box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
        }
        
        .search-bar i {
            position: absolute;
            left: 1rem;
            top: 50%;
            transform: translateY(-50%);
            color: var(--secondary);
        }
        
        .range-slider {
            width: 100%;
            margin: 1rem 0;
        }
        
        .range-labels {
            display: flex;
            justify-content: space-between;
            font-size: 0.85rem;
            color: var(--secondary);
        }
        
        .date-range {
            display: flex;
            gap: 1rem;
        }
        
        .date-range input {
            flex: 1;
            padding: 0.5rem;
            border: 1px solid var(--border);
            border-radius: var(--radius);
            font-size: 0.95rem;
        }
        
        .filter-actions {
            display: flex;
            justify-content: flex-end;
            gap: 1rem;
            margin-top: 1rem;
        }
        
        .btn-reset {
            background-color: var(--light);
            color: var(--secondary);
            border: 1px solid var(--border);
        }
        
        .btn-reset:hover {
            background-color: #e2e8f0;
            color: var(--dark);
        }
        
        .btn-apply {
            background-color: var(--primary);
            color: white;
            border: none;
        }
        
        .btn-apply:hover {
            background-color: var(--primary-dark);
            color: white;
        }
        
        /* 视图切换 */
        .view-controls {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 1.5rem;
        }
        
        .results-count {
            color: var(--secondary);
            font-size: 0.95rem;
        }
        
        .view-toggle {
            display: flex;
            gap: 0.5rem;
            background-color: white;
            border-radius: 6px;
            padding: 0.25rem;
        }
        
        .view-btn {
            background: none;
            border: none;
            padding: 0.35rem 0.75rem;
            border-radius: 4px;
            color: var(--secondary);
            cursor: pointer;
            transition: var(--transition);
        }
        
        .view-btn.active {
            background-color: var(--primary);
            color: white;
        }
        
        /* 赞助卡片通用样式 */
        .sponsorship-card {
            background-color: white;
            border-radius: var(--radius);
            box-shadow: var(--shadow);
            overflow: hidden;
            transition: var(--transition);
            margin-bottom: 1.5rem;
        }
        
        .sponsorship-card:hover {
            transform: translateY(-5px);
            box-shadow: var(--shadow-hover);
        }
        
        .sponsorship-header {
            padding: 1rem 1.5rem;
            border-bottom: 1px solid var(--border);
            display: flex;
            align-items: center;
            gap: 1rem;
        }
        
        .sponsor-avatar {
            width: 40px;
            height: 40px;
            border-radius: 50%;
            object-fit: cover;
        }
        
        .sponsor-info {
            flex: 1;
        }
        
        .sponsor-name {
            font-weight: 600;
            font-size: 1rem;
        }
        
        .sponsor-meta {
            font-size: 0.85rem;
            color: var(--secondary);
            display: flex;
            gap: 1rem;
        }
        
        .sponsorship-body {
            padding: 1.5rem;
        }
        
        .sponsorship-title {
            font-size: 1.3rem;
            font-weight: 600;
            margin-bottom: 0.75rem;
            line-height: 1.4;
        }
        
        .sponsorship-description {
            color: var(--secondary);
            margin-bottom: 1rem;
            line-height: 1.6;
        }
        
        .sponsorship-footer {
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding: 0.75rem 1.5rem;
            border-top: 1px solid var(--border);
            background-color: var(--light);
        }
        
        .stats {
            display: flex;
            gap: 1.5rem;
            font-size: 0.9rem;
            color: var(--secondary);
        }
        
        .stat-item {
            display: flex;
            align-items: center;
            gap: 0.35rem;
        }
        
        .actions {
            display: flex;
            gap: 0.75rem;
        }
        
        .action-btn {
            background: none;
            border: none;
            color: var(--secondary);
            padding: 0.35rem;
            border-radius: 4px;
            display: flex;
            align-items: center;
            gap: 0.35rem;
            font-size: 0.9rem;
            transition: var(--transition);
        }
        
        .action-btn:hover {
            color: var(--primary);
            background-color: rgba(59, 130, 246, 0.1);
        }
        
        .action-btn.liked {
            color: var(--danger);
        }
        
        .action-btn.saved {
            color: var(--primary);
        }
        
        /* 图片容器样式 */
        .image-container {
            margin-bottom: 1rem;
            border-radius: var(--radius);
            overflow: hidden;
        }
        
        .single-image {
            width: 100%;
            height: 220px;
            object-fit: cover;
        }
        
        .multiple-images {
            display: grid;
            grid-template-columns: repeat(2, 1fr);
            gap: 4px;
        }
        
        .multiple-images img {
            width: 100%;
            height: 160px;
            object-fit: cover;
        }
        
        .multiple-images img:nth-child(1) {
            grid-column: 1 / 2;
            grid-row: 1 / 3;
            height: 100%;
        }
        
        /* 无图片样式 */
        .no-image-placeholder {
            background-color: #e2e8f0;
            height: 180px;
            display: flex;
            align-items: center;
            justify-content: center;
            color: var(--secondary);
            margin-bottom: 1rem;
            border-radius: var(--radius);
        }
        
        /* 网格布局 */
        .grid-layout {
            display: grid;
            grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
            gap: 1.5rem;
        }
        
        /* 列表布局 */
        .list-layout .sponsorship-card {
            display: flex;
            height: 280px;
        }
        
        .list-layout .image-container,
        .list-layout .no-image-placeholder {
            width: 30%;
            margin-bottom: 0;
            height: 100%;
        }
        
        .list-layout .single-image {
            height: 100%;
        }
        
        .list-layout .multiple-images {
            height: 100%;
        }
        
        .list-layout .multiple-images img {
            height: 100%;
        }
        
        .list-layout .sponsorship-content {
            width: 70%;
            display: flex;
            flex-direction: column;
        }
        
        .list-layout .sponsorship-body {
            flex: 1;
            overflow: hidden;
        }
        
        .list-layout .sponsorship-description {
            display: -webkit-box;
            -webkit-line-clamp: 3;
            -webkit-box-orient: vertical;
            overflow: hidden;
        }
        
        /* 紧凑布局 */
        .compact-layout .sponsorship-card {
            display: flex;
            align-items: center;
            padding: 1rem;
            height: auto;
        }
        
        .compact-layout .sponsor-avatar {
            width: 50px;
            height: 50px;
            margin-right: 1rem;
        }
        
        .compact-layout .sponsorship-content {
            flex: 1;
        }
        
        .compact-layout .sponsorship-title {
            font-size: 1.1rem;
            margin-bottom: 0.25rem;
        }
        
        .compact-layout .sponsorship-description {
            font-size: 0.9rem;
            margin-bottom: 0.5rem;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
        }
        
        .compact-layout .image-container {
            width: 80px;
            height: 80px;
            margin-bottom: 0;
            margin-left: 1rem;
        }
        
        .compact-layout .single-image {
            height: 100%;
        }
        
        .compact-layout .no-image-placeholder {
            height: 80px;
            width: 80px;
            margin-bottom: 0;
            margin-left: 1rem;
        }
        
        .compact-layout .sponsorship-footer {
            display: none;
        }
        
        .compact-layout .compact-actions {
            display: flex;
            gap: 1rem;
            margin-left: 1rem;
        }
        
        /* 筛选标签 */
        .active-filters {
            display: flex;
            flex-wrap: wrap;
            gap: 0.75rem;
            margin-bottom: 1.5rem;
            padding: 1rem;
            background-color: white;
            border-radius: var(--radius);
            box-shadow: var(--shadow);
        }
        
        .active-filter-tag {
            display: flex;
            align-items: center;
            gap: 0.5rem;
            background-color: rgba(59, 130, 246, 0.1);
            color: var(--primary);
            padding: 0.35rem 0.75rem;
            border-radius: 20px;
            font-size: 0.9rem;
        }
        
        .remove-filter {
            background: none;
            border: none;
            color: var(--primary);
            cursor: pointer;
            font-size: 1rem;
            line-height: 1;
        }
        
        /* 空状态 */
        .empty-state {
            text-align: center;
            padding: 4rem 2rem;
            background-color: white;
            border-radius: var(--radius);
            margin-bottom: 2rem;
        }
        
        .empty-state i {
            font-size: 4rem;
            color: #e2e8f0;
            margin-bottom: 1.5rem;
        }
        
        .empty-state h3 {
            font-size: 1.5rem;
            font-weight: 600;
            margin-bottom: 0.5rem;
        }
        
        .empty-state p {
            color: var(--secondary);
            max-width: 500px;
            margin: 0 auto 1.5rem;
        }
        
        /* 分页 */
        .pagination-container {
            display: flex;
            justify-content: center;
            margin: 3rem 0;
        }
        
        .pagination {
            display: flex;
            gap: 0.5rem;
        }
        
        .page-btn {
            width: 36px;
            height: 36px;
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            border: 1px solid var(--border);
            background-color: white;
            color: var(--secondary);
            cursor: pointer;
            transition: var(--transition);
        }
        
        .page-btn:hover {
            border-color: var(--primary);
            color: var(--primary);
        }
        
        .page-btn.active {
            background-color: var(--primary);
            color: white;
            border-color: var(--primary);
        }
        
        .page-btn.disabled {
            opacity: 0.5;
            cursor: not-allowed;
        }
        
        /* 响应式调整 */
        @media (max-width: 992px) {
            .list-layout .sponsorship-card {
                flex-direction: column;
                height: auto;
            }
            
            .list-layout .image-container,
            .list-layout .no-image-placeholder {
                width: 100%;
                height: 220px;
            }
            
            .list-layout .sponsorship-content {
                width: 100%;
            }
        }
        
        @media (max-width: 768px) {
            .section-title {
                font-size: 1.5rem;
            }
            
            .view-toggle {
                margin-left: 0;
                margin-top: 1rem;
                width: 100%;
                justify-content: center;
            }
            
            .grid-layout {
                grid-template-columns: 1fr;
            }
            
            .date-range {
                flex-direction: column;
                gap: 0.75rem;
            }
            
            .filter-actions {
                flex-direction: column;
            }
            
            .filter-actions button {
                width: 100%;
            }
            
            .compact-layout .sponsorship-card {
                flex-wrap: wrap;
            }
            
            .compact-layout .image-container,
            .compact-layout .no-image-placeholder {
                margin-left: 0;
                margin-top: 1rem;
            }
            
            .compact-layout .compact-actions {
                margin-left: 0;
                margin-top: 1rem;
                width: 100%;
                justify-content: center;
            }
        }
    </style>
</head>
<body>
    <!-- 导航栏 -->
    <nav class="navbar navbar-expand-lg">
        <div class="container">
            <a href="#" class="logo">SocialSponsor</a>
            
            <button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarContent">
                <i class="fas fa-bars"></i>
            </button>
            
            <div class="collapse navbar-collapse" id="navbarContent">
                <ul class="navbar-nav ms-auto">
                    <li class="nav-item">
                        <a class="nav-link" href="#">首页</a>
                    </li>
                    <li class="nav-item">
                        <a class="nav-link active" href="#">赞助列表</a>
                    </li>
                    <li class="nav-item">
                        <a class="nav-link" href="#">发现</a>
                    </li>
                    <li class="nav-item">
                        <a class="nav-link" href="#">消息</a>
                    </li>
                    <li class="nav-item">
                        <a class="nav-link" href="#">
                            <i class="fas fa-user-circle"></i>
                        </a>
                    </li>
                </ul>
            </div>
        </div>
    </nav>
    
    <!-- 主内容区 -->
    <div class="main-content">
        <div class="container">
            <!-- 页面标题 -->
            <div class="section-header">
                <h1 class="section-title">赞助项目列表</h1>
                <p class="section-description">浏览和筛选各类赞助项目，找到您感兴趣的内容进行支持</p>
            </div>
            
            <!-- 筛选区域 -->
            <div class="filters-container">
                <div class="row">
                    <!-- 搜索框 -->
                    <div class="col-md-12 filter-section">
                        <div class="search-bar">
                            <i class="fas fa-search"></i>
                            <input type="text" placeholder="搜索赞助项目、发起人或相关关键词...">
                        </div>
                    </div>
                    
                    <!-- 类别筛选 -->
                    <div class="col-md-6 filter-section">
                        <h3 class="filter-title">
                            <i class="fas fa-tags"></i> 项目类别
                        </h3>
                        <div class="filter-options">
                            <div class="filter-chip active">全部</div>
                            <div class="filter-chip">教育支持</div>
                            <div class="filter-chip">环境保护</div>
                            <div class="filter-chip">文化艺术</div>
                            <div class="filter-chip">医疗健康</div>
                            <div class="filter-chip">科技创新</div>
                            <div class="filter-chip">社会公益</div>
                            <div class="filter-chip">紧急救援</div>
                        </div>
                    </div>
                    
                    <!-- 筹款状态筛选 -->
                    <div class="col-md-6 filter-section">
                        <h3 class="filter-title">
                            <i class="fas fa-hourglass-half"></i> 筹款状态
                        </h3>
                        <div class="filter-options">
                            <div class="filter-chip active">全部状态</div>
                            <div class="filter-chip">筹款中</div>
                            <div class="filter-chip">即将结束</div>
                            <div class="filter-chip">已完成</div>
                            <div class="filter-chip">已超额</div>
                        </div>
                    </div>
                    
                    <!-- 金额范围筛选 -->
                    <div class="col-md-6 filter-section">
                        <h3 class="filter-title">
                            <i class="fas fa-money-bill-wave"></i> 单笔赞助金额
                        </h3>
                        <input type="range" min="0" max="10000" value="5000" class="range-slider" id="amountRange">
                        <div class="range-labels">
                            <span>¥0</span>
                            <span id="rangeValue">¥5,000</span>
                            <span>¥10,000+</span>
                        </div>
                    </div>
                    
                    <!-- 发布时间筛选 -->
                    <div class="col-md-6 filter-section">
                        <h3 class="filter-title">
                            <i class="fas fa-calendar-alt"></i> 发布时间
                        </h3>
                        <div class="filter-options">
                            <div class="filter-chip active">不限时间</div>
                            <div class="filter-chip">今天</div>
                            <div class="filter-chip">本周</div>
                            <div class="filter-chip">本月</div>
                            <div class="filter-chip">近3个月</div>
                            <div class="filter-chip">自定义</div>
                        </div>
                        
                        <div class="date-range" style="margin-top: 1rem; display: none;" id="customDateRange">
                            <input type="date" id="startDate">
                            <input type="date" id="endDate">
                        </div>
                    </div>
                    
                    <!-- 排序方式 -->
                    <div class="col-md-6 filter-section">
                        <h3 class="filter-title">
                            <i class="fas fa-sort"></i> 排序方式
                        </h3>
                        <div class="filter-options">
                            <div class="filter-chip active">推荐排序</div>
                            <div class="filter-chip">最新发布</div>
                            <div class="filter-chip">热门程度</div>
                            <div class="filter-chip">筹款进度</div>
                            <div class="filter-chip">剩余时间</div>
                        </div>
                    </div>
                    
                    <!-- 筛选按钮 -->
                    <div class="col-md-12 filter-actions">
                        <button class="btn btn-reset">
                            <i class="fas fa-redo-alt"></i> 重置筛选条件
                        </button>
                        <button class="btn btn-apply">
                            <i class="fas fa-filter"></i> 应用筛选
                        </button>
                    </div>
                </div>
            </div>
            
            <!-- 活跃筛选标签 -->
            <div class="active-filters">
                <div class="active-filter-tag">
                    项目类别: 教育支持
                    <button class="remove-filter"><i class="fas fa-times"></i></button>
                </div>
                <div class="active-filter-tag">
                    筹款状态: 筹款中
                    <button class="remove-filter"><i class="fas fa-times"></i></button>
                </div>
                <div class="active-filter-tag">
                    单笔金额: 最高¥5,000
                    <button class="remove-filter"><i class="fas fa-times"></i></button>
                </div>
            </div>
            
            <!-- 视图控制和结果计数 -->
            <div class="view-controls">
                <div class="results-count">找到 <strong>24</strong> 个符合条件的赞助项目</div>
                
                <div class="view-toggle">
                    <button class="view-btn active" data-view="grid">
                        <i class="fas fa-th"></i> 网格
                    </button>
                    <button class="view-btn" data-view="list">
                        <i class="fas fa-list"></i> 列表
                    </button>
                    <button class="view-btn" data-view="compact">
                        <i class="fas fa-align-justify"></i> 紧凑
                    </button>
                </div>
            </div>
            
            <!-- 赞助项目列表 -->
            <div class="sponsorships-container grid-layout">
                <!-- 赞助1：多张图片 -->
                <div class="sponsorship-card">
                    <div class="image-container">
                        <div class="multiple-images">
                            <img src="https://picsum.photos/600/400?random=10" alt="手工艺术展作品1" class="thumbnail">
                            <img src="https://picsum.photos/600/400?random=11" alt="手工艺术展作品2" class="thumbnail">
                            <img src="https://picsum.photos/600/400?random=12" alt="手工艺术展作品3" class="thumbnail">
                        </div>
                    </div>
                    
                    <div class="sponsorship-header">
                        <img src="https://picsum.photos/100/100?random=11" alt="李艺的头像" class="sponsor-avatar">
                        
                        <div class="sponsor-info">
                            <div class="sponsor-name">李艺</div>
                            <div class="sponsor-meta">
                                <span>传统文化协会</span>
                                <span>发布于 1周前</span>
                                <span class="badge bg-primary">文化艺术</span>
                            </div>
                        </div>
                    </div>
                    
                    <div class="sponsorship-body">
                        <h3 class="sponsorship-title">传统手工艺术展，传承非物质文化遗产</h3>
                        
                        <p class="sponsorship-description">
                            我们计划举办一场传统手工艺术展，展示剪纸、刺绣、陶艺等非物质文化遗产，让更多人了解和喜爱传统手工艺。展览将免费向公众开放，同时邀请手工艺人现场演示。
                        </p>
                        
                        <div class="progress" style="height: 6px; margin-bottom: 0.75rem;">
                            <div class="progress-bar bg-success" role="progressbar" style="width: 75%" aria-valuenow="75" aria-valuemin="0" aria-valuemax="100"></div>
                        </div>
                        
                        <div style="display: flex; justify-content: space-between; font-size: 0.9rem;">
                            <span><strong>¥75,000</strong> 已筹</span>
                            <span>目标 ¥100,000</span>
                            <span>剩余 <strong>5天</strong></span>
                        </div>
                    </div>
                    
                    <div class="sponsorship-footer">
                        <div class="stats">
                            <div class="stat-item">
                                <i class="fas fa-eye"></i>
                                <span>3,241 浏览</span>
                            </div>
                            <div class="stat-item">
                                <i class="fas fa-comment"></i>
                                <span>156 留言</span>
                            </div>
                        </div>
                        
                        <div class="actions">
                            <button class="action-btn like-btn">
                                <i class="far fa-thumbs-up"></i>
                                <span>542</span>
                            </button>
                            <button class="action-btn save-btn">
                                <i class="far fa-bookmark"></i>
                                <span>收藏</span>
                            </button>
                            <button class="action-btn" style="background-color: var(--primary); color: white;">
                                <i class="fas fa-heart"></i>
                                <span>赞助</span>
                            </button>
                        </div>
                    </div>
                </div>
                
                <!-- 赞助2：单张图片 -->
                <div class="sponsorship-card">
                    <div class="image-container">
                        <img src="https://picsum.photos/600/400?random=20" alt="海洋塑料垃圾清理项目" class="single-image">
                    </div>
                    
                    <div class="sponsorship-header">
                        <img src="https://picsum.photos/100/100?random=12" alt="王海洋的头像" class="sponsor-avatar">
                        
                        <div class="sponsor-info">
                            <div class="sponsor-name">王海洋</div>
                            <div class="sponsor-meta">
                                <span>绿色海洋保护组织</span>
                                <span>发布于 2周前</span>
                                <span class="badge bg-success">环境保护</span>
                            </div>
                        </div>
                    </div>
                    
                    <div class="sponsorship-body">
                        <h3 class="sponsorship-title">海洋塑料垃圾清理计划，守护蓝色家园</h3>
                        
                        <p class="sponsorship-description">
                            组织志愿者团队定期清理海岸线塑料垃圾，同时开展海洋保护宣传教育活动，提高公众环保意识。我们需要资金购买清理工具和环保宣传材料。
                        </p>
                        
                        <div class="progress" style="height: 6px; margin-bottom: 0.75rem;">
                            <div class="progress-bar bg-primary" role="progressbar" style="width: 45%" aria-valuenow="45" aria-valuemin="0" aria-valuemax="100"></div>
                        </div>
                        
                        <div style="display: flex; justify-content: space-between; font-size: 0.9rem;">
                            <span><strong>¥90,000</strong> 已筹</span>
                            <span>目标 ¥200,000</span>
                            <span>剩余 <strong>20天</strong></span>
                        </div>
                    </div>
                    
                    <div class="sponsorship-footer">
                        <div class="stats">
                            <div class="stat-item">
                                <i class="fas fa-eye"></i>
                                <span>5,678 浏览</span>
                            </div>
                            <div class="stat-item">
                                <i class="fas fa-comment"></i>
                                <span>215 留言</span>
                            </div>
                        </div>
                        
                        <div class="actions">
                            <button class="action-btn like-btn liked">
                                <i class="fas fa-thumbs-up"></i>
                                <span>987</span>
                            </button>
                            <button class="action-btn save-btn">
                                <i class="far fa-bookmark"></i>
                                <span>收藏</span>
                            </button>
                            <button class="action-btn" style="background-color: var(--primary); color: white;">
                                <i class="fas fa-heart"></i>
                                <span>赞助</span>
                            </button>
                        </div>
                    </div>
                </div>
                
                <!-- 赞助3：无图片 -->
                <div class="sponsorship-card">
                    <div class="no-image-placeholder">
                        <i class="fas fa-microphone-alt" style="font-size: 2rem;"></i>
                    </div>
                    
                    <div class="sponsorship-header">
                        <img src="https://picsum.photos/100/100?random=13" alt="赵文学的头像" class="sponsor-avatar">
                        
                        <div class="sponsor-info">
                            <div class="sponsor-name">赵文学</div>
                            <div class="sponsor-meta">
                                <span>乡村教师联盟</span>
                                <span>发布于 3周前</span>
                                <span class="badge bg-warning">教育支持</span>
                            </div>
                        </div>
                    </div>
                    
                    <div class="sponsorship-body">
                        <h3 class="sponsorship-title">乡村教师培训计划，提升教学质量</h3>
                        
                        <p class="sponsorship-description">
                            邀请城市优秀教师为乡村教师提供线上线下培训，分享教学经验和方法，帮助乡村教师提升教学能力，让农村孩子享受更好的教育资源。
                        </p>
                        
                        <div class="progress" style="height: 6px; margin-bottom: 0.75rem;">
                            <div class="progress-bar bg-warning" role="progressbar" style="width: 60%" aria-valuenow="60" aria-valuemin="0" aria-valuemax="100"></div>
                        </div>
                        
                        <div style="display: flex; justify-content: space-between; font-size: 0.9rem;">
                            <span><strong>¥120,000</strong> 已筹</span>
                            <span>目标 ¥200,000</span>
                            <span>剩余 <strong>10天</strong></span>
                        </div>
                    </div>
                    
                    <div class="sponsorship-footer">
                        <div class="stats">
                            <div class="stat-item">
                                <i class="fas fa-eye"></i>
                                <span>2,154 浏览</span>
                            </div>
                            <div class="stat-item">
                                <i class="fas fa-comment"></i>
                                <span>98 留言</span>
                            </div>
                        </div>
                        
                        <div class="actions">
                            <button class="action-btn like-btn">
                                <i class="far fa-thumbs-up"></i>
                                <span>321</span>
                            </button>
                            <button class="action-btn save-btn saved">
                                <i class="fas fa-bookmark"></i>
                                <span>已收藏</span>
                            </button>
                            <button class="action-btn" style="background-color: var(--primary); color: white;">
                                <i class="fas fa-heart"></i>
                                <span>赞助</span>
                            </button>
                        </div>
                    </div>
                </div>
            </div>
            
            <!-- 分页 -->
            <div class="pagination-container">
                <div class="pagination">
                    <button class="page-btn disabled">
                        <i class="fas fa-chevron-left"></i>
                    </button>
                    <button class="page-btn active">1</button>
                    <button class="page-btn">2</button>
                    <button class="page-btn">3</button>
                    <button class="page-btn">4</button>
                    <button class="page-btn">5</button>
                    <button class="page-btn">
                        <i class="fas fa-chevron-right"></i>
                    </button>
                </div>
            </div>
        </div>
    </div>
    
    
    <!-- Bootstrap 5 JS Bundle with Popper -->
    <script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/js/bootstrap.bundle.min.js"></script>
    
    <script>
        document.addEventListener('DOMContentLoaded', function() {

            
            // 金额范围滑块
            const rangeInput = document.getElementById('amountRange');
            const rangeValue = document.getElementById('rangeValue');
            
            rangeInput.addEventListener('input', function() {
                const value = parseInt(this.value);
                // 格式化金额显示
                rangeValue.textContent = `¥${value.toLocaleString()}`;
            });
            
            // 自定义日期范围显示切换
            const customDateChip = document.querySelector('.filter-chip:contains("自定义")');
            const customDateRange = document.getElementById('customDateRange');
            
            document.querySelectorAll('.filter-chip').forEach(chip => {
                if (chip.textContent.trim() === '自定义') {
                    chip.addEventListener('click', function() {
                        // 显示自定义日期范围输入框
                        customDateRange.style.display = this.classList.contains('active') ? 'flex' : 'none';
                    });
                }
            });
            
            // 筛选芯片点击事件
            document.querySelectorAll('.filter-chip').forEach(chip => {
                chip.addEventListener('click', function() {
                    // 找到同一组中的其他筛选芯片
                    const siblings = Array.from(this.parentElement.children);
                    
                    // 如果不是"全部"或"不限"选项，则取消同组中其他选中状态
                    if (!this.textContent.includes('全部') && !this.textContent.includes('不限')) {
                        siblings.forEach(sib => sib.classList.remove('active'));
                    }
                    
                    // 切换当前芯片的选中状态
                    this.classList.toggle('active');
                });
            });
            
            // 移除活跃筛选标签
            document.querySelectorAll('.remove-filter').forEach(btn => {
                btn.addEventListener('click', function() {
                    const tag = this.closest('.active-filter-tag');
                    tag.remove();
                    
                    // 如果没有活跃筛选标签，隐藏整个容器
                    if (document.querySelectorAll('.active-filter-tag').length === 0) {
                        document.querySelector('.active-filters').style.display = 'none';
                    }
                    
                    showNotification('已移除筛选条件');
                });
            });
            
            // 视图切换功能
            const viewButtons = document.querySelectorAll('.view-btn');
            const sponsorshipsContainer = document.querySelector('.sponsorships-container');
            
            viewButtons.forEach(button => {
                button.addEventListener('click', function() {
                    // 移除所有按钮的活跃状态
                    viewButtons.forEach(btn => btn.classList.remove('active'));
                    // 添加当前按钮的活跃状态
                    this.classList.add('active');
                    
                    // 切换布局类
                    const viewType = this.getAttribute('data-view');
                    sponsorshipsContainer.className = 'sponsorships-container';
                    sponsorshipsContainer.classList.add(`${viewType}-layout`);
                    
                    showNotification(`已切换为${this.textContent.trim()}视图`);
                });
            });
            
            // 应用筛选按钮
            document.querySelector('.btn-apply').addEventListener('click', function() {
                showNotification('筛选条件已应用');
                // 这里可以添加实际筛选逻辑
            });
            
            // 重置筛选按钮
            document.querySelector('.btn-reset').addEventListener('click', function() {
                // 重置所有筛选芯片
                document.querySelectorAll('.filter-chip').forEach(chip => {
                    chip.classList.remove('active');
                    // 激活"全部"或"不限"选项
                    if (chip.textContent.includes('全部') || chip.textContent.includes('不限')) {
                        chip.classList.add('active');
                    }
                });
                
                // 重置金额滑块
                rangeInput.value = 5000;
                rangeValue.textContent = '¥5,000';
                
                // 隐藏自定义日期范围
                customDateRange.style.display = 'none';
                
                // 清空搜索框
                document.querySelector('.search-bar input').value = '';
                
                // 清空活跃筛选标签
                document.querySelectorAll('.active-filter-tag').forEach(tag => tag.remove());
                document.querySelector('.active-filters').style.display = 'none';
                
                showNotification('已重置所有筛选条件');
            });
            
            // 点赞功能
            document.querySelectorAll('.like-btn').forEach(btn => {
                btn.addEventListener('click', function() {
                    const icon = this.querySelector('i');
                    const countSpan = this.querySelector('span');
                    let count = countSpan ? parseInt(countSpan.textContent) : 0;
                    
                    if (icon.classList.contains('far')) {
                        // 点赞
                        icon.classList.remove('far');
                        icon.classList.add('fas', 'liked');
                        if (countSpan) countSpan.textContent = count + 1;
                        showNotification('点赞成功');
                    } else {
                        // 取消点赞
                        icon.classList.remove('fas', 'liked');
                        icon.classList.add('far');
                        if (countSpan) countSpan.textContent = count - 1;
                        showNotification('已取消点赞');
                    }
                });
            });
            
            // 收藏功能
            document.querySelectorAll('.save-btn').forEach(btn => {
                btn.addEventListener('click', function() {
                    const icon = this.querySelector('i');
                    const textSpan = this.querySelector('span');
                    
                    if (icon.classList.contains('far')) {
                        // 收藏
                        icon.classList.remove('far');
                        icon.classList.add('fas', 'saved');
                        textSpan.textContent = '已收藏';
                        showNotification('已收藏该赞助项目');
                    } else {
                        // 取消收藏
                        icon.classList.remove('fas', 'saved');
                        icon.classList.add('far');
                        textSpan.textContent = '收藏';
                        showNotification('已取消收藏');
                    }
                });
            });
            
            // 分页按钮
            document.querySelectorAll('.page-btn:not(.disabled)').forEach(btn => {
                if (!btn.querySelector('i')) { // 排除箭头按钮
                    btn.addEventListener('click', function() {
                        document.querySelectorAll('.page-btn').forEach(b => b.classList.remove('active'));
                        this.classList.add('active');
                        showNotification(`已切换到第${this.textContent}页`);
                    });
                }
            });
            
            // 赞助按钮功能
            document.querySelectorAll('.action-btn:has(.fa-heart)').forEach(btn => {
                btn.addEventListener('click', function() {
                    showNotification('打开赞助页面');
                    // 实际应用中这里会跳转到赞助详情页或打开赞助模态框
                });
            });
        });
    </script>
</body>
</html>

